﻿using System;
using System.Collections.Generic;
using System.Globalization;

namespace Atomic.Vasp.Options
{
	[Serializable]
	public class VaspOptionCollection : List<VaspOption>
	{
		internal VaspOptionCollection()
		{
		}

		internal VaspOptionCollection(IEnumerable<VaspOption> options)
			: base(options)
		{
		}
		
		public void Add(string name, string value)
		{
			Add(new VaspIncarOption(name, value));
		}

		public void Add(string name, bool value)
		{
			Add(name, value ? ".TRUE." : ".FALSE.");
		}

		public void Add(string name, double value)
		{
			Add(name, value.ToString(CultureInfo.InvariantCulture));
		}

		public void Add(string name, int value)
		{
			Add(name, value.ToString());
		}
	}
}
